Respect display names of Android content URIs
authorPo Lu <luangruo@yahoo.com>
Tue, 19 Mar 2024 04:08:17 +0000 (12:08 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 19 Mar 2024 04:08:17 +0000 (12:08 +0800)
commitf2e239c6a7d54ec3849a3bb783685953b6683752
tree0bb5d158eb1da4672d727057d2e045d8a9eb0bcc
parentce29ae32d0b05cedbc9ba65c1a347ab7c34420ad
Respect display names of Android content URIs

* java/org/gnu/emacs/EmacsNative.java (displayNameHash): New
function.

* java/org/gnu/emacs/EmacsService.java (buildContentName): New
argument RESOLVER.  Generate names holding URI's display name if
available.  All callers changed.

* lisp/international/mule-cmds.el (set-default-coding-systems):
Fix file name coding system as utf-8-unix on Android as on Mac
OS.

* src/androidvfs.c (enum android_vnode_type): New enum
ANDROID_VNODE_CONTENT_AUTHORITY_NAMED.
(android_content_name): Register root directories for this new
type.
(displayNameHash): New function.
(android_get_content_name): New argument WITH_CHECKSUM.  If
present, treat the final two components as a pair of checksum
and display name, and verify and exclude the two.
(android_authority_name): Provide new argument as appropriate.
(android_authority_initial_name): New function.
java/org/gnu/emacs/EmacsNative.java
java/org/gnu/emacs/EmacsOpenActivity.java
java/org/gnu/emacs/EmacsService.java
lisp/international/mule-cmds.el
src/androidvfs.c